<!--
 * @LastEditors: tangdy tdy853839625@qq.com
 * @FilePath: /HumanGenerateVideo/src/views/_builtin/403/index.vue
-->
<script setup lang="ts">
import { onMounted } from 'vue';
import { localStg } from '@/utils/storage';
onMounted(() => {
  localStg.remove('humanToken');
  // 跳转到登录页
  const url = import.meta.env.VITE_SERVICE_LOGOUT_URL;
  // 获取当前页面的URL组件
  const protocol = window.location.protocol; // 获取协议，例如 'http:'
  const hostname = window.location.hostname; // 获取主机名，例如 'example.com'
  const port = window.location.port; // 获取端口号，如果有的话

  // 构建根路径
  let rootUrl = `${protocol}//${hostname}`;
  if (port) {
    rootUrl += `:${port}`;
  }
  rootUrl += '/product-list';
  window.open(`${url}?humanRedirect=${encodeURIComponent(rootUrl)}`, '_self');
});
</script>

<template>
  <!-- <ExceptionBase type="403" /> -->
  <div></div>
</template>

<style scoped></style>
